	

-- D:\GOA\reslibrary\templete\res\area\area.phone.lua.xsl 14
					
gr_module("gm_xinbanchunzhongyun")

mainorderareaArea = inherit(GmCtrl.ControlBase):name("mainorderareaArea")

mainorderareaArea.init = function (self,parent,aid)

	local top = self
	local fid = aid or "mainorderareaArea"
	GmCtrl.ControlBase.init(self,parent,fid )
		
	self.btoadd = self:get_child("btoadd")
	self.btoadd:set_click(function(link)
		top.hostWindow:addNavFrame('cgforderadd',nil,function(frame)
		end)			
	end)
	
	
	self.btosort = self:get_child("btosort")
	self.btosort:set_click(function(link)
		top.panel_pop:set_visible(true)
	end)
	
	
	--[[
	
	self.customerindex = self:get_child("customerindex")
	self.customerindex:set_click(function(link)			
			
		top.hostWindow:addNavFrame('customersale',nil,function(frame)
				
		end)
					  			
	end)
	
	self.customerindex = self:get_child("customerindex")
	self.customerindex:set_click(function(link)			
			
		top.hostWindow:addNavFrame('customersale',nil,function(frame)
				
		end)
					  			
	end)
	
	self.customerindex = self:get_child("customerindex")
	self.customerindex:set_click(function(link)			
			
		top.hostWindow:addNavFrame('customersale',nil,function(frame)
				
		end)
					  			
	end)
	
	self.customerindex = self:get_child("customerindex")
	self.customerindex:set_click(function(link)			
			
		top.hostWindow:addNavFrame('customersale',nil,function(frame)
				
		end)
					  			
	end)
	
	
	
	]]
	
	-- D:\GOA\reslibrary\templete\res\area\_include.lua.xsl 47 cgforderlistarea
	self.cgforderlistarea = gm_xinbanchunzhongyun.cgforderlistareaArea(self)	
		
	--self.cgforderlistarea:init_net_data()	
	
	

	self.page = 0
	
	self:show_scroll_bar(true)

end


mainorderareaArea.on_show = function(self,key)

	if self.cgforderlistarea and self.cgforderlistarea.on_show then
		self.cgforderlistarea:on_show(key)
	end
	
	
end







mainorderareaArea.set_ref_data = function(self,data)
	table.print(data)
	for a,b in pairs(data) do
		if self[a] then
			self[a]:set_text(b)
		end
	end
end


mainorderareaArea.set_data = function(self,data)
	self.data = data
	
	for a,b in pairs(data) do
		if self[a] ~= nil and type(self[a]) == 'table' and self[a].set_text ~= nil then
			self[a]:set_text(tostring(b))
		end
	end
	
end



mainorderareaArea.set_title = function(self,value)
	self.title = value
end
		